package com.unit.handler;

import java.time.LocalDateTime;

import com.unit.util.TimeUtil;

public class LocalDateTimeHandler implements DataObjectHandler {

	@Override
	public Object convert(String data, Class<?> propType) {
		if(LocalDateTime.class.equals(propType)) {
			try {
				return TimeUtil.convertLocalDateTime(data);
			} catch (Exception e) {
				throw new RuntimeException(e.getMessage());
			}
		}
		return null;
	}

}
